package com.shyroke.daydayzhuanapi.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

@Getter
@Setter
@Entity
@Table(name = "users")
public class UserEntity extends BaseEntity implements Serializable {
    private String name;

    private String password;

    private String author;

    private Integer status;

    private Date lastLoginTime;

    private String email;

    private String touxiang;

    private String pay;

    private String realName;

    @ManyToMany(cascade = CascadeType.ALL)
    @JoinTable(name = "user_role",joinColumns = @JoinColumn(name = "userid"),
            inverseJoinColumns = @JoinColumn(name = "roleid"))
    private Set<RoleEntity> roleList;

}